package com.tinyseed.emcp.api.maintenance.domain;

import com.tinyseed.emcp.api.basicdata.domain.Enterprise;
import com.tinyseed.hmxx.common.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.sql.Timestamp;

@Data
@Entity
@Table(name = "tb_tel_return_record")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@DynamicInsert
@DynamicUpdate
public class TelReturnRecord extends BaseEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tel_return_record_seq")
    @SequenceGenerator(sequenceName = "tel_return_record_sequence", name = "tel_return_record_seq_id", allocationSize = 1)
    private Long id;


    //接线员名称
    @Column
    private String operator;

    //拨打电话时间
    @Column
    private Timestamp callTime;


    //去电/来电 0 电监管企业异常报警 1 维保回访结果 2 客户来电
    @Column
    private String reasonForCall;

    //拨打电话结果
    @Column
    private String callResult;

    //企业名称
    @Column
    private String enterpriseName;

    //是否需上门 0 需要 1 不需要
    @Column
    private String shouldMaintenance;

    //企业联系方式
    @Column
    private String contactInformation;

    @ManyToOne
    @JoinColumn(name = "enterprise_id")
    private Enterprise enterprise;



}
